/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.manager.impl;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.domain.po.ExaminationRecordQuestionPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xy.biz.ts.domain.bo.ExaminationRecordQuestionBO;
import com.xy.biz.ts.domain.query.ExaminationRecordQuestionQuery;
import com.xy.biz.ts.domain.converter.ExaminationRecordQuestionConverter;
import com.xy.biz.ts.manager.ExaminationRecordQuestionManager;
import com.xy.biz.ts.dao.ExaminationRecordQuestionDao;

/**
 *
 *
 * @author yzh
 * @date 2021-4-6
 */
@Service
public class ExaminationRecordQuestionManagerImpl implements ExaminationRecordQuestionManager {

	@Autowired
	private ExaminationRecordQuestionDao examinationRecordQuestionDao;

	@Override
	public int saveExaminationRecordQuestion(ExaminationRecordQuestionBO examinationRecordQuestionBO) {
		return examinationRecordQuestionDao.saveExaminationRecordQuestion(ExaminationRecordQuestionConverter.toPO(examinationRecordQuestionBO));
	}

	@Override
	public int saveAllExaminationRecordQuestion(Collection<ExaminationRecordQuestionBO> collection) {
		return examinationRecordQuestionDao.saveAllExaminationRecordQuestion(ExaminationRecordQuestionConverter.toPO(collection));
	}

	@Override
	public int saveAllExaminationRecordQuestionUnmodified(Collection<ExaminationRecordQuestionBO> collection) {
		return examinationRecordQuestionDao.saveAllExaminationRecordQuestionUnmodified(ExaminationRecordQuestionConverter.toPO(collection));
	}

	@Override
	public int updateExaminationRecordQuestion(ExaminationRecordQuestionBO examinationRecordQuestionBO) {
		return examinationRecordQuestionDao.updateExaminationRecordQuestion(ExaminationRecordQuestionConverter.toPO(examinationRecordQuestionBO));
	}

	@Override
	public int deleteExaminationRecordQuestion(Long examinationRecordQuestionId) {
		return examinationRecordQuestionDao.deleteExaminationRecordQuestion(examinationRecordQuestionId);
	}

	@Override
	public ExaminationRecordQuestionBO getExaminationRecordQuestion(Long examinationRecordQuestionId) {
		return ExaminationRecordQuestionConverter.fromPO(examinationRecordQuestionDao.getExaminationRecordQuestion(examinationRecordQuestionId));
	}

	@Override
	public List<ExaminationRecordQuestionBO> listExaminationRecordQuestionById(Collection<Long> collection) {
		return ExaminationRecordQuestionConverter.fromPO(examinationRecordQuestionDao.listExaminationRecordQuestionById(collection));
	}

	@Override
	public List<ExaminationRecordQuestionBO> listExaminationRecordQuestion(ExaminationRecordQuestionQuery query) {
		return ExaminationRecordQuestionConverter.fromPO(examinationRecordQuestionDao.listExaminationRecordQuestion(query));
	}

	@Override
	public int countExaminationRecordQuestion(ExaminationRecordQuestionQuery query) {
		return examinationRecordQuestionDao.countExaminationRecordQuestion(query);
	}

    @Override
    public int updateExaminationRecordQuestionList(List<ExaminationRecordQuestionBO> examinationRecordQuestionBOS) {
		return examinationRecordQuestionDao.updateExaminationRecordQuestionList(ExaminationRecordQuestionConverter.toPO(examinationRecordQuestionBOS));
    }

	@Override
	public int countExaminationRecordScore(Long examinationRecordId) {
		return examinationRecordQuestionDao.countExaminationRecordScore(examinationRecordId);
	}

}
